/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Grandulon;
import Aplicación.Server;
import Aplicación.ServerGUI;
/**
 *
 * @author MariaDeFreitas
 */
public class NewBully {
    public static void main(String[] args) {
       
       int total_processes =3;
     
        
        RunningThread[] t = new RunningThread[total_processes];
        for (int i = 0; i < total_processes; i++) {
            t[i] = new RunningThread(new Process(i+1, i+1), total_processes);//passing process id, priority, total no. of processes to running thread
        }
        try {
            Election.initialElection(t);
        } catch (Exception e) {
            System.out.println("Possibly you are using null references in array");
        }
        for (int i = 0; i < total_processes; i++) {
            new Thread(t[i]).start();//start every thread
        }    
}
}


